
<input id="{$input->name}_search" value="{$input->value}" class="fg_textField" type="text" onkeypress="{$input->name}_searchObject.enterSearch( event );">
<input name="{$input->name}[maxElements]" type="hidden" value="{$input->maxElements}">
<input name="{$input->name}[keys]" type="hidden" id="{$input->name}_keys" value="">
<input name="{$input->name}[values]" type="hidden" id="{$input->name}_values" value="">
<img src="{$templateUrl}Images/Icons/find.gif" class="fg_inputButton" onclick="{$input->name}_searchObject.search();"/>

<div id="{$input->name}_result" class="fg_searchSelectResult" style="display:none;">
<div class="fg_searchSelectResultClose" onclick="{$input->name}_searchObject.hideResult()">Sulge </div>
<div id="{$input->name}_resultContents"></div>
</div>

<table id="{$input->name}_table" cellpadding="3" cellspacing="1" border="0" class="fg_searchSelectTable">
	<tr id="{$input->name}_none" style="background-color:#FFFFFF" >
		<td align="left" colspan="3"><strong>Ei leitud tulemusi!</strong></td>
	</tr>			
</table>

<script type="text/javascript">
	{$input->name}_searchObject = new fg_searchSelect( "{$input->name}", "{$input->ajaxUrl}", "{$input->maxElements}", "{$input->allowAddingNew}" );
	{foreach item=i from=$input->selected}
		{$input->name}_searchObject.add( "{$i.key}", "{$i.value|escape}" );
	{/foreach}
</script>
